import 'package:json_annotation/json_annotation.dart';

@JsonSerializable()
class LoginResponse extends Object {
  @JsonKey(name: 'result')
  String? result;
  @JsonKey(name: 'msg')
  String? msg;
  @JsonKey(name: 'userId')
  String? userId;
  @JsonKey(name: 'cookie')
  String? cookie;

  LoginResponse({
    this.result,
    this.msg,
    this.userId,
    this.cookie,
  });

  LoginResponse.fromJson(Map<String, dynamic> loginCache) {
    result = loginCache["result"];
    msg = loginCache["msg"];
    userId = loginCache["userId"];
    cookie = loginCache["cookie"];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> loginCache = <String, dynamic>{};
    loginCache["result"] = result;
    loginCache["msg"] = msg;
    loginCache["userId"] = userId;
    loginCache["cookie"] = cookie;
    return loginCache;
  }
}
